<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>user-login</title>
</head>
<style type="text/css">
input {float:right;}
form {width:400px;}
</style>
<body>
<form id="form1" name="form1" method="post" action="?action=user.login">
<c:if test="${error}"><font color ="red"> Some field[s] is[are] missing: </font><br /></c:if>
<c:if test="${userNameMissing}"><font color ="red">  o User Name </font><br /></c:if>
<c:if test="${passMissing}"><font color ="red">  o Password </font><br /></c:if>
<c:if test="${wrongPass}"><font color="red"> o Sai mat khau</font><br /></c:if>
<c:if test="${wrongUser}"><font color="red"> o Nguoi dung khong ton tai</font><br /></c:if>
<c:if test="${sqlError}"><font color ="red">  o Database Error! </font><br /></c:if>
  <br />
  <label>User:
  <input type="text" name="userName" id="userName" />
  </label>
  <p>
    <label>Password:
    <input type="password" name="password" id="password" />
    </label>
   </p>
   <p>
	<a href="?action=user.forgetpass" title="forget it?" target="_self">forget password?</a>
	<a href="?action=user.signup" title="sign up" target="_self"> sign up</a>
   </p>
  
  <p>&nbsp;</p>
  <p>
    <label>
    <input style="margin-left:200px; float:none;" type="submit" name="logIn" id="logIn" value="Log In" />
    
    </label>
    
  </p>
  <p><a href="/tracnghiem/home" title="home" target="_self"> Home</a></p>
</form>
</body>
</html>